package com.lhh.jiu.service.serviceImpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lhh.jiu.entity.User;
import com.lhh.jiu.mapper.UserMapper;
import com.lhh.jiu.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>implements IUserService {
    @Autowired
    UserMapper userMapper;


    @Override
    public User queryUserByUsername(User user) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username",user.getUsername());
        return userMapper.selectOne(queryWrapper);
    }
}
